package com.ys.vo;

import java.util.List;
import java.util.Map;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;

public class LayuiTableVoJA {
	private int code;
	private String msg;
	private int count;
	private JSONArray data;
	private JSONObject totalRow;
	public int getCode() {
		return code;
	}
	public void setCode(int code) {
		this.code = code;
	}
	public String getMsg() {
		return msg;
	}
	public void setMsg(String msg) {
		this.msg = msg;
	}
	public int getCount() {
		return count;
	}
	public void setCount(int count) {
		this.count = count;
	}
	public JSONArray getData() {
		return data;
	}
	public void setData(JSONArray data) {
		this.data = data;
	}
	public JSONObject getTotalRow() {
		return totalRow;
	}
	public void setTotalRow(JSONObject totalRow) {
		this.totalRow = totalRow;
	}
	public void setRowsByListMap(List<Map<String, Object>> listMap) {
		String jsonStr = JSON.toJSONStringWithDateFormat(listMap, "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteDateUseDateFormat);
		JSONArray JA = JSON.parseArray(jsonStr);
		this.data = JA;
		this.code = 0;
		this.msg = "";
	}

	public void addRows(JSONObject rowJO) {

		this.data.add(rowJO);
	}
}
